package main

import (
    "fmt"
    "math"
    "time"
)

var calNum = 500000000

func test() int {
    sum := 0
    for i := 0; i < calNum; i++ {
        sum += i
    }
    return sum
}

func test2() int{
    dictionary := make(map[int] string)
    for i := 0; i < calNum; i++ {
        dictionary[i] = "hello"
    }
    return 1
}

func main() {
    start := time.Now().UnixNano()
    test()
    end := time.Now().UnixNano()
    fmt.Println(float64(end - start) / math.Pow(10, 9))
}